<?php
/**
 * Created by PhpStorm.
 * User: zhou
 * Date: 2019/3/24
 * Time: 下午10:21
 */

namespace App\Http\Controllers\Api\Hotel;
use App\Http\Controllers\ApiController;
use App\Models\Hotel;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
class DashboardController extends ApiController
{
    /**
     * 商家首页显示各种详细数据
     */
    public function data(Request $request,Hotel $hotel)
    {
        $validator = Validator::make($request->all(), [
            'hotel_open_id'   => 'required'
        ]);

        if($validator->fails()){
            return self::response(null,self::ERROR_CODE,$validator);
        }

        $data = $hotel -> api_dashbard_data($request->all());

        return self::response($data);
    }




}